<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<script type="text/javascript">

window.onbeforeunload = function(e){
     return "你的数据还没有保存呢！";
}

</script>
</head>
<body>

 

</body>
</html>
